<!DOCTYPE html>
<html>

<head>
    <title>Example</title>
    <style type="text/css">
        /* 后代选择器  匹配id属性为mytable的元素的后代 且匹配td元素类型选择器*/
        #mytable td {
            border: thin black solid;
            padding: 4px;
        }
    </style>
</head>


<body>
    <table id="mytable">
        <tr><th>Name</th><th>City</th></tr>
        <tr><td>Adam Freeman</td><td>London</td></tr>
        <tr><td>Joe Smith</td><td>New York</td></tr>
        <tr><td>Anne Jones</td><td>Pairs</td></tr>
    </table>
    <p>I like <span>apples</span> and oranges.</p>
    <table id="othertable">
        <tr><th>Name</th><th>City</th></tr>
        <tr><td>Adam Freeman</td><td>London</td></tr>
        <tr><td>Joe Smith</td><td>New York</td></tr>
        <tr><td>Anne Jones</td><td>Pairs</td></tr>
    </table>
</body>

</html>